#include"Tcpconneciton.h"
Tcpconnection::Tcpconnection(int fd)
:_socket(fd)
,_soIO(fd)
{

}
Tcpconnection::~Tcpconnection(){

}
void Tcpconnection::send(const string &msg){
    _soIO.writen(msg.c_str(),msg.size());
}
string Tcpconnection::recv(){
    //写操作
    char buff[10] = {0};
    _soIO.readLine(buff,sizeof(buff));
    return string(buff);
}